home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
serial
/
callback.001
/
callback~
/
callback
/
lib
/
log
/
logv.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-17
|
501b
|
30 lines
#include "log.p"
void logv(char *fmt, va_list args)
{
FILE
*logfile;
time_t
ltime;
if
(
(logfile = fopen (log_filename, "a")) // logfile opened ok
||
(logfile = fopen (panic_filename, "a")) // panicfile opened ok
)
{
time (<ime);
fprintf
(
logfile, "%s %s V %s ", ctime (<ime),
getprogname(), version
);
vfprintf (logfile, fmt, args);
fputc('\n', logfile);
fclose(logfile);
}
}